home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 1 Issue 2 / PDCD-1 - Issue 02.iso / _utilities / utilities / 004 / _adhesive / examples / readme < prev    next >
Text File  |  1994-09-21  |  2KB  |  71 lines

  1. This directory contains an example of using Adhesive from C and from BASIC
  2. assembler.
  3.  
  4. The examples are supplied with source code, object code and executable code.
  5.  
  6. Note if you recompile the objects you will need to copy the objects into
  7. the 'objects' directory replacing the old ones.
  8.  
  9. Remember to choose the 'object' option for CAHG and 'module' option for Link.
  10. (Don't choose the module option for CC)
  11.  
  12. Contents:
  13.  readme         this file
  14.  install        install the objects
  15.  remove         opposite of install, do this when you have finished
  16.  objects        directory containing objects ready for installation
  17.  obj2           source code for object 2 (DDE C)
  18.  obj3           source code for object 3 (BASIC)
  19.  CUser          user program (DDE C)
  20.  
  21.  
  22. How the examples work
  23. =====================
  24.  
  25. Obj3
  26. ~~~~
  27. This is a simple object written in BASIC assembler. It consists of one function
  28. to reverse a string given a pointer to the string and the length of the string.
  29.  
  30. Because this is written in BASIC assembler we have to set up the Adhesive
  31. object header ourselves. This is fairly simple however.
  32.  
  33. Note the the function to reverse the string is compatible with an APCS
  34. caller.
  35.  
  36.  
  37. Obj2
  38. ~~~~
  39. This object is written in C. The 'cahg.adh' file describes what objects
  40. Obj2 requires and what procedure it has to offer. Note not all of the
  41. Shared C Library procedures are actually required at present.
  42.  
  43. This object uses C's strlen() and Obj2 to implement a function which
  44. reverses a string without having to be told the length of it.
  45.  
  46. Don't forget to use the 'object' option in CAHG and the 'module' option in
  47. link when compiling. (Do not choose the 'module' option in CC.)
  48.  
  49. CUser
  50. ~~~~~
  51. This user is written in C.
  52.  
  53. Again the 'cahg.need' file describes what objects the user requres.
  54. We only request Obj2 (Obj3 will be automatically loaded by Adhesive).
  55.  
  56. Because the cahg file is called 'need' a label called cahg_need_ObjectsNeeded
  57. is defined by cahg. This is passed to adhesive_Request(). Note you
  58. require to link with the file 'tools.o.Adhesive'.
  59.  
  60. Note the way an atexit() handler is used to ensure that the user always
  61. deregisters with Adhesive even if the program exits abnormally.
  62.  
  63.  
  64.  
  65. Final note
  66. ==========
  67. If you have questions on these examples or using Adhesive or programming
  68. assembler which is APCS conformant please do not hesitate to contact me,
  69. it is best (and cheapest for me) if you do this by email. The file 'readme1st'
  70. explains how to get in contact with me.
  71.